import java.net.*;

public class GetHost {

  public static void main(String args[]){
    for (String name: args) {
      try {
        InetAddress address = InetAddress.getByName(name);
        System.out.println("host: " + address.getHostName());
        System.out.println("IP: " + address.getHostAddress());      
      } catch (UnknownHostException e) {
        System.err.println("nao foi encontrado " + name);
      }
    }
  }
}